home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / doc_library.pro < prev    next >
Text File  |  1997-07-08  |  3KB  |  94 lines

  1. ; $Id: doc_library.pro,v 1.4 1997/01/15 03:11:50 ali Exp $
  2. ;
  3. ; Copyright (c) 1982-1997, Research Systems, Inc.  All rights reserved.
  4. ;    Unauthorized reproduction prohibited.
  5. ;
  6.  
  7. pro doc_library, name, print=printflg, directory = direct, multi = multi, $
  8.     PATH = path, FILE=file
  9. ;+
  10. ; NAME:
  11. ;    DOC_LIBRARY
  12. ;
  13. ; PURPOSE:
  14. ;    Extract the documentation template of one or more IDL modules
  15. ;    (procedures or functions).  This command provides a standard interface
  16. ;    to the operating-system specific DL_DOS, DL_UNIX, and
  17. ;    DL_VMS procedures.
  18. ;
  19. ; CATEGORY:
  20. ;    Help, documentation.
  21. ;
  22. ; CALLING SEQUENCE:
  23. ;    DOC_LIBRARY        ;For prompting.
  24. ;
  25. ;    DOC_LIBRARY, Name     ;Extract documentation for procedure Name using
  26. ;                the current !PATH.
  27. ;
  28. ; INPUTS:
  29. ;    Name:    The string containing the name of the procedure.
  30. ;        Under Unix, Name may be "*" to get information on all routines.
  31. ;
  32. ; KEYWORDS:
  33. ;    PRINT:    If set, this keyword sends the output of DOC_LIBRARY to the
  34. ;        default printer.  Under Unix, if PRINT is a string, it is
  35. ;        interpreted as a shell command used for output with
  36. ;        the documentation from DOC_LIBRARY providing standard input
  37. ;        (i.e. PRINT="cat > junk").
  38. ;
  39. ; UNIX KEYWORDS:
  40. ;   DIRECTORY:    The directory to search.  If omitted, the current directory
  41. ;        and !PATH are used.
  42. ;
  43. ;    MULTI:    If set, this flag allows printing of more than one file if the
  44. ;        requested module exists in more than one directory in the path
  45. ;        and the current directory.
  46. ;
  47. ; VMS KEYWORDS:
  48. ;    FILE:    If this keyword is set, the output is left in the file
  49. ;        "userlib.doc", in the current directory.
  50. ;
  51. ;    PATH:    An optional directory/library search path.  This keyword uses
  52. ;        the same format and semantics as !PATH.  If omitted, !PATH is
  53. ;        used.
  54. ;
  55. ; OUTPUTS:
  56. ;    Documentation is sent to the standard output unless /PRINT
  57. ;    is specified.
  58. ;
  59. ; COMMON BLOCKS:
  60. ;    None.
  61. ;
  62. ; SIDE EFFECTS:
  63. ;    Output is produced on terminal or printer.
  64. ;
  65. ; RESTRICTIONS:
  66. ;    The DIRECTORY and MULTI keywords are ignored under VMS. The
  67. ;    FILE and PATH keywords are ignored under Unix.
  68. ;
  69. ; EXAMPLE:
  70. ;    To obtain documentation for the User's Library function DIST, enter:
  71. ;        DOC_LIBRARY, 'DIST'
  72. ;
  73. ;    For a graphical interface to DOC_LIBRARY, see the procedure XDL.
  74. ;
  75. ; MODIFICATION HISTORY:
  76. ;    Written, DMS, Sept, 1982.
  77. ;    Added library param, Jul 1987.
  78. ;    Unix version, DMS, Feb, 1988.
  79. ;    New VMS version, DMS, Dec. 1989
  80. ;    Wrapper procedure to call the correct version
  81. ;        under Unix and VMS, AB, Jan 1990
  82. ;       Added support for DOS, SNG, Dec, 1990
  83. ;    Added support for Macintosh, DJE, Nov, 1994
  84. ;-
  85.  
  86. on_error,2                        ;Return to caller if an error occurs
  87. case !version.os of
  88.   'vms':    DL_VMS, NAME, PRINT=printflg, FILE=file, PATH=path
  89.   'Win32':    DL_DOS, NAME, DIRECTORY=direct, PRINT=printflg
  90.   'MacOS':    DL_MAC, NAME, DIRECTORY=direct, PRINT=printflg
  91.   else:        DL_UNIX, NAME, DIRECTORY=direct, PRINT=printflg, MULTI = multi
  92. endcase
  93. end
  94.